Previous Book Contents Book Index Next

Inside Macintosh: 3D Graphics Programming With QuickDraw 3D /
Chapter 20 - QuickDraw 3D Mathematical Utilities / QuickDraw 3D Mathematical Utilities Reference
QuickDraw 3D Mathematical Utilities


Utility Functions

QuickDraw 3D provides several mathematical utility functions. You can use the following two macros to convert degrees to radians, and vice versa.

#define Q3Math_DegreesToRadians(x)  ((x) * kQ3Pi / 180.0)
#define Q3Math_RadiansToDegrees(x)  ((x) * 180.0 / kQ3Pi)
You can use the following two macros to get the minimum and maximum of two values.

#define Q3Math_Min(x,y)    ((x) <= (y) ? (x) : (y))
#define Q3Math_Max(x,y)    ((x) >= (y) ? (x) : (y))

Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996